'use strict';

var _interopRequireDefault = require('@babel/runtime/helpers/interopRequireDefault');
Object.defineProperty(exports, '__esModule', {
  value: true,
});
exports.default = void 0;
var _objectSpread2 = _interopRequireDefault(require('@babel/runtime/helpers/objectSpread2'));
var _objectDestructuringEmpty2 = _interopRequireDefault(
  require('@babel/runtime/helpers/objectDestructuringEmpty'),
);
var _extends2 = _interopRequireDefault(require('@babel/runtime/helpers/extends'));
var _react = _interopRequireDefault(require('react'));
var _antd = require('antd');
var _createField = _interopRequireDefault(require('../../../createField'));
var SingleRadio = function SingleRadio(_ref) {
  var rest = (0, _extends2.default)({}, ((0, _objectDestructuringEmpty2.default)(_ref), _ref));
  return /*#__PURE__*/ _react.default.createElement(
    _antd.Radio,
    (0, _objectSpread2.default)({}, rest),
  );
};
var _default = (0, _createField.default)(SingleRadio, {
  defaultDetailComponent: function defaultDetailComponent(props) {
    return /*#__PURE__*/ _react.default.createElement(
      _antd.Radio,
      (0, _objectSpread2.default)(
        (0, _objectSpread2.default)({}, props),
        {},
        {
          disabled: true,
        },
      ),
    );
  },
  defaultFormItemProps: {
    valuePropName: 'checked',
    // @ts-ignore
    getValueFromEvent: function getValueFromEvent(event) {
      return event.target.checked;
    },
  },
});
exports.default = _default;
